<?php
declare (strict_types=1);

namespace app\api\validate;

use think\Validate;

class Register extends Validate
{
    protected $rule = [
        //"account"      => "require",
        "mobile"       => "require|mobile",
        //"captcha"      => "require",
        "password"     => "require|min:6",
        //"pay_password" => "require|min:6",
    ];

    /**
     * 定义错误信息
     * 格式：'字段名.规则名'    =>    '错误信息'
     *
     * @var array
     */
    protected $message = [
        //'account.require'      => '请填写用户名',
        'mobile.require'       => '请填写手机号',
        'mobile.mobile'        => '手机号格式错误',
        //'captcha.require'      => '请填写验证码',
        'password.require'     => '请填写登录密码',
        'password.min'         => '登录密码过短',
        //'password.confirm'     => '确认登录密码不相符',
        'pay_password.require' => '请填写支付密码',
        'pay_password.min'     => '支付密码过短',
        //'pay_password.confirm' => '确认支付密码不相符',

        //'district'            => '地区码'

    ];
}
